package com.educate.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

/**
 * @author yjj
 * @date 2021/12/22
 * @Description MultipartResolver 配置
 */
@Configuration
public class MultipartResolverConfig {
    @Bean
    public CommonsMultipartResolver multipartResolver(){
        CommonsMultipartResolver resolver = new CommonsMultipartResolver();
        resolver.setDefaultEncoding("UTF-8");
        resolver.setMaxInMemorySize(Integer.MAX_VALUE);
        return resolver;
    }
}
